import pandas as pd

##calendar.json
d=pd.date_range("20020101","20500101",freq ='C').strftime('%Y%m%d')
d=pd.Series(d)
d.to_json(r'C:\Users\admin\Desktop\fwshare\calendar.json',orient='values')

# read=pd.read_json('calendar.json')
# print(read)